This invention relates, in general, to the management of log streams of a multisystem environment and, in particular, to pacing the frequency at which the log streams are compressed by systems of the multisystem environment.
In various computer systems, historical log data is maintained in, for instance, log files for use in system recovery, problem determination and/or system maintenance. Typically, these log files have a limited amount of capacity to retain the historical data. After the capacity is met, at least some of the data records are moved from the log files to external storage devices, such as direct access storage devices (DASD), thereby providing additional space in the log files for more data.
At some point, data within the log files and/or on the external storage devices is no longer needed. For example, there is no need to keep the data once it passes its retention requirements. The saving of data past its usefulness adversely affects system performance in a number of ways. For instance, when unnecessary data is retained and a log file needs to be browsed to recover logged data during recovery of a failure, the browser may have to deal with potentially large amounts of unnecessary data, thereby slowing down the recovery process. Additionally, when the saving of unwanted data records requires the use of external storage devices, which typically provide slower access to the data, the reading of the data takes longer, thus, affecting system performance.
Therefore, it is beneficial to delete any unnecessary data from the log files. This is accomplished by compressing the log files and then physically deleting any entries that can be deleted. When a log file is used by various systems of a multisystem environment, each of the systems is responsible for compressing and deleting its unwanted entries.
When the systems of the multisystem environment are processing at different transaction rates, however, and the slower system does not adequately compress the log file at a rate commensurate with the faster system, the slower system adversely affects the performance of the faster system. This is true regardless of whether the reason for the disparity in transaction rates is hardware performance characteristics or work load differences. Thus, the faster system potentially has many more elements in the log file than the slower system, and the elements of the faster system can be separated by a single element written by the slower system. This problem may be exacerbated when there are several fast systems and only one slow system.
Based on the foregoing, a need exists for a capability that provides for the pacing of the frequency at which a system compresses a multisystem log file. A further need exists for a capability that allows each system to adjust its compression rate based on the compression rates of the other systems, thus ensuring a minimal sized log file. A further need exists for a pacing technique that allows the frequency of compression to be adjusted in real-time based on the current transaction rates of the systems connected to the log file.
The shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method of pacing the frequency at which multisystem log streams are compressed. In one example, a rate at which a multisystem log stream is compressed by one system of a multisystem environment is ascertained. The rate is relative to how frequently the multisystem log stream is compressed by at least one other system of the multisystem environment. The frequency at which the one system compresses the multisystem log stream is adjusted, in real-time.
In one example, the rate is ascertained by checking a compress lag count of the one system. The compress lag count represents the rate at which the one system is compressing the multisystem log stream relative to how frequently the multisystem log stream is compressed by the at least one other system.
In one embodiment, the frequency of compression is adjusted by increasing the frequency at which the one system compresses the multisystem log stream, when the ascertained rate indicates that the one system is compressing the multisystem log stream at a slower rate than at least one other system. As one example, the increasing of the frequency includes forcing a compression to be performed by the one system.
In a further embodiment, the method includes determining, at predefined time intervals, whether the ascertained rate is indicating that the frequency at which the one system compresses is to be increased.
In a further embodiment, the time of the predefined time intervals is decreased, when it is determined that the ascertained rate of the one system has a predetermined relationship with a selected value. As one example, the selected value is two times (a number of systems coupled to the multisystem log stream minus one).
In another embodiment of the invention, a method of pacing the frequency at which multisystem log streams are compressed is provided. The method includes, for instance, ascertaining a rate at which a multisystem log stream is compressed by one system of the multisystem environment; comparing, at predefined time intervals, the ascertained rate to a predefined value to determine whether the frequency at which the one system compresses the multisystem log stream is to be adjusted; adjusting, in real-time, the frequency at which the one system compresses the multisystem log stream, when the comparing indicates adjusting; determining whether the time of the predefined time intervals is to be modified; and modifying the time of the predefined time intervals to adjust how often the comparing is performed, when it is determined that the time is to be modified.
The compression pacing capability of the present invention advantageously adjusts, in real-time, the frequency at which systems compress a multisystem log stream. Each system adjusts its compression rate based on the compression rates of the other systems, ensuring a minimal sized log stream. This increases the likelihood that the log stream can be contained solely in the coupling facility, and decreases the likelihood of degrading system performance caused by offloading active data onto external storage devices. The technique of the present invention advantageously handles permanent transaction rate differences, such as different processor capacities, as well as temporal changes, like spikes in transaction rates. The log stream compression pacing of the present invention is based on heuristics, and the frequency of the compression is adjusted in real-time based on the current transaction rates (i.e., the writes to the log stream).
Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention.